package edu.usm.roberge.model;

/**
 * Model class to represent the data return by the web service for a particular
 * stock
 */
public class StockQuoteData {

	private String symbol, last, date, 
				   time, change,open, 
				   high, low, volume,
				   mktCap, prevClose, perChange,
				   annRange, earns, pe, name;

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof StockQuoteData) {
			return this.symbol.equals(((StockQuoteData)obj).symbol);
		}
		return false;
	}	
	
	@Override
	public int hashCode() {
		return symbol.hashCode();
	}

	@Override
	public String toString() {
		return name + " (" + change + ")";
	}

	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public void setLast(String last) {
		this.last = last;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public void setChange(String change) {
		this.change = change;
	}

	public void setOpen(String open) {
		this.open = open;
	}

	public void setHigh(String high) {
		this.high = high;
	}

	public void setLow(String low) {
		this.low = low;
	}

	public void setVolume(String volume) {
		this.volume = volume;
	}

	public void setMktCap(String mktCap) {
		this.mktCap = mktCap;
	}

	public void setPrevClose(String prevClose) {
		this.prevClose = prevClose;
	}

	public void setPerChange(String perChange) {
		this.perChange = perChange;
	}

	public void setAnnRange(String annRange) {
		this.annRange = annRange;
	}

	public void setEarns(String earns) {
		this.earns = earns;
	}

	public void setPe(String pe) {
		this.pe = pe;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSymbol() {
		return symbol;
	}

	public String getLast() {
		return last;
	}

	public String getDate() {
		return date;
	}

	public String getTime() {
		return time;
	}

	public String getChange() {
		return change;
	}

	public String getOpen() {
		return open;
	}

	public String getHigh() {
		return high;
	}

	public String getLow() {
		return low;
	}

	public String getVolume() {
		return volume;
	}

	public String getMktCap() {
		return mktCap;
	}

	public String getPrevClose() {
		return prevClose;
	}

	public String getPerChange() {
		return perChange;
	}

	public String getAnnRange() {
		return annRange;
	}

	public String getEarns() {
		return earns;
	}

	public String getPe() {
		return pe;
	}

	public String getName() {
		return name;
	}
}
